﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HumanResorcesProj.BLL;

namespace HumanResorcesProj.GUI.Extensions
{
    public partial class ChildEdit : System.Web.UI.Page
    {
        ChildrenBLL BLL = new ChildrenBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
         
            Label1.Text = SearchEmplyee.Curr.CurrEmpName + " " + SearchEmplyee.Curr.CurrEmpLastName;
            Label2.Text = SearchEmplyee.Curr.CurrEmpID;
        }

        protected void GridView1_RowDeleted(object sender, GridViewDeletedEventArgs e)
        {

            string ParentName = SearchEmplyee.Curr.CurrEmpID;

            int countRows = BLL.GetByName(ParentName).Rows.Count;

            Emp emp = new Emp();
            emp.UpdateChildNum(ParentName, countRows);
        }


        
    }
}
